<form id="pagerForm" method="post" action="jms/stock">
	<input type="hidden" name="pageNum" value="${(pager.pageNumber)!}" />
	<input type="hidden" name="numPerPage" value="${(pager.pageSize)!}" />
</form>

<div class="pageHeader">

	<form id="searchForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="jms/stock" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						<label>订单号：</label>
						<input type="text" size="20" name="stock.oid" value="${(oid)!}" />
					</td>

					<td>
						<label>物资名称：</label>
						<input type="text" size="20" name="stock.materialName" value="${(materialName)!}" />
					</td>

					<td>
						<label>项目名称：</label>
						<input type="text" size="20" name="stock.projectName" value="${(projectName)!}" />
					</td>


					<td>
						<label>区县：</label>
						<select name="stock.homeCounty" class="combox">
							<option value="">---请选择---</option>
							<#list homeCountyList as s>
								<option value="${(s.name)!}" <#if (homeCounty)?? && homeCounty==s.name>selected="selected"</#if>>${(s.name)!}</option>
							</#list>
						</select>
					</td>

					<td>
						<label>库存状态：</label>
						<select name="stock.type">
							<option value="">---请选择---</option>
							<option value="1" <#if (type)?? && type=='1'> selected="selected"</#if>>入库</option>
							<option value="-1" <#if (type)?? && type=='-1'> selected="selected"</#if>>出库</option>
						</select>
					</td>

					<td>
						<div class="button"><div class="buttonContent"><button type="submit">查询</button></div></div>
					</td>
				</tr>

			</table>
		</div>
	</form>
</div>

<div class="pageContent" style="padding:0px">

	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add"  href="jms/stock/add" target="dialog" rel="jms_stock_add" width="850" height="560" mask="true"><span>订单入库</span></a></li>
			<li class="line">line</li>
			<li><a class="delete" href="jms/stock/delete"  target="selectedTodo" rel="ids"  title="确认删除？"><span>删除</span></a></li>
			<li class="line">line</li>
			<li class=""><a class="icon" href="jms/stock/export" target="dwzExport" targettype="navTab" title="实要导出这些记录吗?"><span>导出</span></a></li>

		</ul>
	</div>

	<table class="table" layoutH="160">
		<thead>
		<tr>
			<th width="80" align="left"><input type="checkbox" group="ids" class="checkboxCtrl"/>行号</th>
			<th width="80" align="center">库存/领料</th>
			<th width="150" align="left">物资名称</th>
			<th width="80" align="center">出入库数量</th>
			<th width="40" align="center">单价</th>
			<th width="60" align="left">计量单位</th>
			<th width="150" align="left">规格型号</th>
			<th width="180" align="left">供应商</th>
			<th width="100" align="left">订单号</th>
			<th width="100" align="left">流水号</th>
			<th width="100" align="left">物料编号</th>
			<th width="150" align="left">项目名称</th>
			<th width="50" align="left">区县</th>
			<th width="100" align="left">出入库日期</th>
			<th width="150" align="left">备注</th>
		</tr>
		</thead>
		<tbody>
		<#list pager.list as stock>

			<tr target="sid_obj" rel="${(stock.id)!}" ondblclick="migr.baseMoudleDblick(this)">
				<td align="center">
					<input name="ids" type="checkbox" value="${(stock.id)!}"/>
					${stock_index + 1}
				</td>
				<td align="center">
					<#if (stock.type)?? && stock.type==1>
						<a class="btnSelect" href="jms/stock/sub/?oid=${(stock.oid)!}&mid=${(stock.mid)!}"  rel="jms_stock_sub" title="领料" target="navTab">领料</a>
					<#elseif  (stock.type)?? && stock.type==-1>
						出库
					<#else>
						其他
					</#if>

				</td>
				<td>${(stock.name)!}</td>
				<td>${(stock.quantity)!}</td>
				<td>${(stock.price)!}</td>
				<td>${(stock.unit)!}</td>
				<td>${(stock.model)!}</td>
				<td>${(stock.supplier)!}</td>
				<td>${(stock.oid)!}</td>
				<td>${(stock.id)!}</td>
				<td>${(stock.mid)!}</td>

				<td>${(stock.projectName)!}</td>
				<td>${(stock.homeCounty)!}</td>
				<td>${(stock.createDate?string("yyyy-MM-dd"))!}</td>
				<td>${(stock.memo)!}</td>

			</tr>
		</#list>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" <#if pager.pageSize == 20> selected</#if>>20</option>
				<option value="50" <#if pager.pageSize == 50> selected</#if>>50</option>
				<option value="100"<#if pager.pageSize == 100> selected</#if>>100</option>
				<option value="200"<#if pager.pageSize == 200> selected</#if>>200</option>
			</select>
			<span>条，共<font style="color:red;font-weight:bold;">${pager.totalRow!}</font>条，共<font style="color:red;font-weight:bold;">${pager.totalPage!}</font>页&nbsp;&nbsp;&nbsp;&nbsp;</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${pager.totalRow!}" numPerPage="${pager.pageSize!}" pageNumShown="10" currentPage="${pager.pageNumber!}"></div>
	</div>
</div>